<?php
if(strpos($_SERVER["REQUEST_URI"], "/web") !== false)
{
  $pageURL = 'http';
  if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
  $pageURL .= "://";
  $pageURL .= $_SERVER["SERVER_NAME"].str_replace("/web/", "/", $_SERVER["REQUEST_URI"]);
  header("location: " . $pageURL);

  die();
}

$_SERVER['SCRIPT_NAME'] = '/index.php';

require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php');

$configuration = ProjectConfiguration::getApplicationConfiguration('frontend', 'prod', false);
sfContext::createInstance($configuration)->dispatch();
